{extend name="index/base" /}
{block name="body" }
<blockquote class="layui-elem-quote">
	<button url="{:url('import')}" class="layui-btn layui-btn-sm confirm" lay-submit lay-filter="ajax-post" hide-data="true">
		<i class="layui-icon">&#xe654;</i> 重新导入
	</button>
	<a href="http://pub.alimama.com/manage/selection/list.htm" class="layui-btn layui-btn-sm" target="_blank">管理选品库</a>
</blockquote>
<table id="tb1" lay-filter="_tb1"></table>
{/block}

{block name="script"}
<script type="text/html" id="bar">
	<div class="layui-btn-group">
	  <a class="layui-btn layui-btn-sm" href="http://pub.alimama.com/manage/selection/detail.htm?groupId={{d.favorites_id}}" target="_blank" >管理</a>
	</div>
</script>
<script>
	layui.use(['tool'], function() {
		var $ = layui.$,layer = layui.layer, form = layui.form,table = layui.table,tool = layui.tool;
		var tableobj = table.render({
			elem:'#tb1',
			url:'{:url('index')}',
			limit:20,
			limits:[10,20,50,100],
			page:true,
			//size:'sm',
			method:'get',
			height:'full-100',
			cols:[[
				{title:'选品库ID',field:'favorites_id'},
				{title:'选品库名称',field:'favorites_title'},
				{title:'选品库类型',field:'type'},
				{title:'导入时间',field:'create_time'},
				{title:'操作',fixed: 'right', width:100, align:'center', templet: '#bar'}
			]]
		});
	});
</script>
{/block}
